package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IAffirmOrderActivityModel;
import com.wgts.wgts.mvp.model.imp.AffirmOrderActivityModel;
import com.wgts.wgts.mvp.presenter.IAffirmOrderActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.AffirmOrderActivityPresenter;
import com.wgts.wgts.mvp.view.IAffirmOrderActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/615:02
 *
 */
@Module
public class AffirmOrderActivityModule {
    private IAffirmOrderActivityView view;

    public AffirmOrderActivityModule(IAffirmOrderActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IAffirmOrderActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IAffirmOrderActivityModel provideModel(NetService netService){
        return new AffirmOrderActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IAffirmOrderActivityPresenter providePresenter(IAffirmOrderActivityView view, IAffirmOrderActivityModel model){
        return new AffirmOrderActivityPresenter(view, model);
    }
}
